﻿using System;
using System.Collections.Generic;
using System.Text;

namespace VGS {
    /// <summary>
    /// Singleton class
    /// </summary>
    public class VolleyMatch {
        private static VolleyMatch instance;
        private Team home_team = new Team();
        private Team away_team = new Team();
        private Sets sets = new Sets();

        #region Constructor
        /// <summary>
        /// Private constructor to ensure singleton pattern.
        /// Adds a set, so there is at least one.
        /// </summary> 
        private VolleyMatch()
        {
            //sets.Add();
        }
        #endregion

        #region Properties
        /// <summary>
        /// Get the home team
        /// </summary>
        public Team HomeTeam
        {
            get
            {
                return home_team;
            }
        }


        /// <summary>
        /// Gets the sets
        /// </summary>
        public Sets Sets
        {
            get
            {
                return sets;
            }
        }


        /// <summary>
        /// Get the away team
        /// </summary>
        public Team AwayTeam
        {
            get
            {
                return away_team;
            }
        }
        #endregion


        /// <summary>
        /// Returns the singleton instance
        /// </summary>
        /// <returns>Singleton instance</returns>
        public static VolleyMatch Instance
        {
            get
            {
                if (instance == null)
                    instance = new VolleyMatch();
                return instance;
            }
        }
    }
}
